# Maintainer:
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>

_pyname=icecream
pkgname=python-$_pyname
pkgver=2.1.3
pkgrel=4
pkgdesc='Sweet and creamy print debugging'
arch=(any)
url='https://github.com/gruns/icecream'
license=(MIT)
depends=(python-colorama python-pygments python-executing python-asttokens)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://files.pythonhosted.org/packages/source/i/$_pyname/$_pyname-$pkgver.tar.gz)
sha256sums=('0aa4a7c3374ec36153a1d08f81e3080e83d8ac1eefd97d2f4fe9544e8f9b49de')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_pyname-$pkgver
  python setup.py test
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
}
